load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "partitionccl",
    srcs = ["partition.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/partitionccl",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ccl/utilccl",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/catpb",
        "//pkg/sql/catalog/colinfo",
        "//pkg/sql/catalog/schemaexpr",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/sql/rowenc",
        "//pkg/sql/rowenc/valueside",
        "//pkg/sql/schemachanger/scdeps",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sem/volatility",
        "//pkg/sql/types",
        "//pkg/util/encoding",
        "//pkg/util/errorutil/unimplemented",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "partitionccl_test",
    size = "medium",
    srcs = [
        "alter_primary_key_test.go",
        "drop_test.go",
        "main_test.go",
        "partition_test.go",
        "scrub_test.go",
        "zone_test.go",
    ],
    embed = [":partitionccl"],
    deps = [
        "//pkg/base",
        "//pkg/ccl",
        "//pkg/ccl/storageccl",
        "//pkg/ccl/testutilsccl",
        "//pkg/ccl/utilccl",
        "//pkg/config",
        "//pkg/config/zonepb",
        "//pkg/jobs",
        "//pkg/jobs/jobspb",
        "//pkg/keys",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/bootstrap",
        "//pkg/sql/catalog/catalogkeys",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/desctestutils",
        "//pkg/sql/catalog/tabledesc",
        "//pkg/sql/gcjob",
        "//pkg/sql/importer",
        "//pkg/sql/lexbase",
        "//pkg/sql/parser",
        "//pkg/sql/randgen",
        "//pkg/sql/rowenc",
        "//pkg/sql/scrub",
        "//pkg/sql/scrub/scrubtestutils",
        "//pkg/sql/sem/tree",
        "//pkg/sql/tests",
        "//pkg/sql/types",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/encoding",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "//pkg/util/randutil",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_cockroach_go_v2//crdb",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
        "@com_github_stretchr_testify//require",
        "@in_gopkg_yaml_v2//:yaml_v2",
    ],
)
